package com.yike.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yike.user.entity.PlatformRoleMenu;
import com.yike.user.param.PlatformRoleMenuPageParam;

import org.apache.ibatis.annotations.Mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.io.Serializable;
import java.util.Set;

/**
 * 平台角色菜单 Mapper 接口
 *
 * @author Sakura
 * @since 2024-10-29
 */
@Mapper
public interface PlatformRoleMenuMapper extends BaseMapper<PlatformRoleMenu> {

    Set<Long> findMenuIdsByRoleId(@Param("roleId") Long roleId);

    int saveRoleMenus(@Param("roleId") Long roleId, @Param("menuIds") Set<Long> menuIds);

    int deleteByMenuIds(@Param("roleId") Long roleId, @Param("menuIds") Set<Long> menuIds);

    int deleteByRoleId(@Param("roleId") Long roleId);


}
